package thread;

public class Thread3 implements Runnable {
    private String name;
    public Thread3(String name){
        this.name=name;
    }
    @Override
    public void run() {
        for(int i=1;i<=30;i++){
            System.out.println(name+" print "+i);
        }
    }

    public static void main(String[] args) {
        for(int i=1;i<=4;i++){
            Thread th=new Thread(new Thread3("线程"+i));
            th.start();
        }
    }
}
